<%@ page language="java" import="java.util.*,com.tjsinfo.tjsoa.common.PaginationSupport" pageEncoding="UTF-8"%>
<%@page import="java.text.SimpleDateFormat"%>
<%@page import="com.tjsinfo.tjsoa.worksummary.vo.WorkSummaryExamine"%>
<%@page import="com.tjsinfo.tjsoa.system.vo.TSystemUser;"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
	+ request.getServerName() + ":" + request.getServerPort()
	+ path + "/";
	PaginationSupport paginationSupport=(PaginationSupport) request.getAttribute("openExamineList");
	//List<WorkSummaryExamine> infos = paginationSupport.getItems();
	List<WorkSummaryExamine> infos = paginationSupport.getItems();
    List user = (List)request.getAttribute("user"); 
    String id = (String)request.getAttribute("id"); 
    //总结页面的翻页用变量
	String pageNoStr = request.getParameter("pageNo");
	if (pageNoStr == null)
		pageNoStr = "0";
	Integer pageNo = Integer.valueOf(pageNoStr);
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<html:base />
			<html:base />
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>粮油集团办公自动化协作平台</title>
	    <link href="<%=basePath%>style/txlz7.css" rel="stylesheet" type="text/css" />
		<script type="text/javascript" src="<%=basePath%>js/ieverson.js"></script>
	    <script type="text/javascript">
	    function submitpages(value){
			if(value==-1){
				alert("请重新选择页码!");
				return ;
			}
			window.location.href='<%=basePath%>tjsinfo/tjsoa/worksummary/openExamine.do?pageNo='+value+'&id=<%=id%>';
		}
	      function back()
		   {
			  history.back(-1);
		   }
	    </script>
</head>
<body>
<div style="height:92%">
<div id="right" >
      <div class="p_01">
            <ul>
                <li><img src="<%=basePath%>images/ckyj.gif" /></li>
                <li class="s01"><a href="<%=basePath %>tjsinfo/tjsoa/worksummary/workSummaryList.do?start=1">返回</a></li>
                
            </ul>
      </div>
      <div class="contact_content" >
      <table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%">
          <tr>
            <td width="99%" valign="top" height="98%">
      
           <div class="contab" style="overflow: scroll;">
							<table class="p_06" width="100%" border="0" cellspacing="0">
								<tr>
									<th width="76%">
										意见
									</th>
									<th width="24%">
										批示人

									</th>
								</tr>
									<%
										int a = 1;
																	Iterator iterator2 = user.iterator();
																	for (Iterator iterator = infos.iterator(); iterator.hasNext();) {
																		WorkSummaryExamine wse = (WorkSummaryExamine) iterator.next();
																		TSystemUser u  = (TSystemUser)iterator2.next();
																		if(a % 2 == 0){
									%>
								    <tr bgcolor="#F4F4F4">
									<td>
									<div style="overflow-y:scroll; overflow-x:hidden; height:100px">
										<%=wse.getExamineContent() %>
										</div>
										</td>
										<%		    
								   %>
									<td>
								       <%=u.getUserName() %>

									</td>
									</tr>
									<%
								   		}else{
								   		%>
								   <tr>
									<td>
									<div style="overflow-y:scroll; overflow-x:hidden; height:100px">
										<%=wse.getExamineContent() %>
										</div>
										</td>
										<%		    
								   %>
									<td>
								       <%=u.getUserName() %>

									</td>
									</tr>
								   		<% 
								   		}
								   		a++;
								   		}
								    %>    
								
		          <tr align="center">
										<td colspan="3" style="border-bottom: 1px #d0d0d0 solid">
											<div class="page01">
												共<%=paginationSupport.getTotalCount()%>条,共<%=paginationSupport.getPageCount()%>页&nbsp;&nbsp;
												当前为第<%=pageNo + 1%>页&nbsp;&nbsp;

												<%
														if (paginationSupport.getStartIndex() > 1) {
													%>
												<a
													href="<%=basePath%>tjsinfo/tjsoa/worksummary/openExamine.do?pageNo=<%=pageNo - 1%>&id=<%=id %>">上一页</a>
												<%
														}
													%>

												<% if (paginationSupport.getStartIndex() + paginationSupport.getPageSize() < paginationSupport .getTotalCount()) {
													%>
												<a
													href="<%=basePath%>tjsinfo/tjsoa/worksummary/openExamine.do?pageNo=<%=pageNo + 1%>&id=<%=id %>">下一页</a>
												<%
														}
													%>

												&nbsp;&nbsp; 跳转到

												<select name="selectPage" id="selectPage"
													onchange="submitpages(this.value)">
													<option value="0">
														--跳转--
													</option>
													<%
															for (int pi = 0; pi < paginationSupport.getPageCount(); pi++) {
														%>
													<option value="<%=pi%>"><%=pi + 1%></option>
													<%
															}
														%>
												</select>
												页

											</div>
										</td>
									</tr>
                 </table>
               </div>
            </td>
          </tr>
      </table>
      </div>
</div>
</div>
</body>
</html>
